package com.example.javachatroomextend.service;

import com.example.javachatroomextend.mapper.FriendMapper;
import com.example.javachatroomextend.model.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FriendService {
    @Autowired
    private FriendMapper friendMapper;

    public List<Session> getFriendList(Integer userId) {
        return friendMapper.getFriendList(userId);
    }

    public Integer isFriends(Integer userId,Integer friendId) {
        return friendMapper.isFriends(userId,friendId);
    }

    public Integer addFriend(Integer userId,Integer friendId) {
        return friendMapper.addFriend(userId,friendId);
    }
}
